﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Test_asp_NET_v4
{
    public partial class Test_a : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
        {
            //参考资料
            //http://msdn.microsoft.com/zh-cn/library/System.Web.UI.WebControls.Menu(v=vs.110).aspx

            Menu2.Visible = true;

            switch (e.Item.Value)
            {
                case "Products":
                    SiteMapDataSource_Menu2.StartingNodeUrl = "Default.aspx?node=hardware";
                    return;
                case "Services":
                    SiteMapDataSource_Menu2.StartingNodeUrl = "Default.aspx?node=consulting";
                    return;
                case "Support":
                    SiteMapDataSource_Menu2.StartingNodeUrl = "Default.aspx?node=drivers";
                    return;
            }
        }
    }
}